package com.straw.hat.springboot.context.aware;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

/**
 * @author jianshan@byai.com
 * @date 2020/12/15 9:41 AM
 * describe:
 */
@Component
public class StrawHatApplicationAware implements ApplicationContextAware {

    private ApplicationContext applicationContext ;

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        System.out.println("Straw Hat ApplicationAware setApplicationContext");
        this.applicationContext = applicationContext;
    }
}
